Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\cubes>mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.06 sec)

mysql> exit;
Bye

C:\Users\cubes>mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.27 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cdcol              |
| joomla             |
| mb120              |
| mb125              |
| mysql              |
| nb158e             |
| performance_schema |
| phpmyadmin         |
| plaincart          |
| ssdfdsf            |
| test               |
| webauth            |
| zf_tutorial        |
+--------------------+
14 rows in set (0.13 sec)

mysql> CREATE DATABASE `nb158f`;
Query OK, 1 row affected (0.06 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cdcol              |
| joomla             |
| mb120              |
| mb125              |
| mysql              |
| nb158e             |
| nb158f             |
| performance_schema |
| phpmyadmin         |
| plaincart          |
| ssdfdsf            |
| test               |
| webauth            |
| zf_tutorial        |
+--------------------+
15 rows in set (0.00 sec)

mysql> USE `nb158f`;
Database changed
mysql> SHOW TABLES;
Empty set (0.00 sec)

mysql> CREATE TABLE `users`
    -> (
    -> `id` INT AUTO_INCREMENT PRIMARY KEY,
    -> `name` VARCHAR(80),
    -> `email` VARCHAR(80),
    -> `password` VARCHAR(80),
    -> `register_date` DATETIME,
    -> `modify_date`TIMESTAMP,
    -> `status` ENUM('0','1')
    -> );
Query OK, 0 rows affected (0.43 sec)

mysql> SHOW TABLES;
+------------------+
| Tables_in_nb158f |
+------------------+
| users            |
+------------------+
1 row in set (0.00 sec)

mysql> DESCRIBE `users`;
+---------------+---------------+------+-----+-------------------+----------------------
-------+
| Field         | Type          | Null | Key | Default           | Extra
       |
+---------------+---------------+------+-----+-------------------+----------------------
-------+
| id            | int(11)       | NO   | PRI | NULL              | auto_increment
       |
| name          | varchar(80)   | YES  |     | NULL              |
       |
| email         | varchar(80)   | YES  |     | NULL              |
       |
| password      | varchar(80)   | YES  |     | NULL              |
       |
| register_date | datetime      | YES  |     | NULL              |
       |
| modify_date   | timestamp     | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIM
ESTAMP |
| status        | enum('0','1') | YES  |     | NULL              |
       |
+---------------+---------------+------+-----+-------------------+----------------------
-------+
7 rows in set (1.71 sec)

mysql> DESCRIBE `users`;
+---------------+---------------+------+-----+-------------------+----------------------
-------+
| Field         | Type          | Null | Key | Default           | Extra
       |
+---------------+---------------+------+-----+-------------------+----------------------
-------+
| id            | int(11)       | NO   | PRI | NULL              | auto_increment
       |
| name          | varchar(80)   | YES  |     | NULL              |
       |
| email         | varchar(80)   | YES  |     | NULL              |
       |
| password      | varchar(80)   | YES  |     | NULL              |
       |
| register_date | datetime      | YES  |     | NULL              |
       |
| modify_date   | timestamp     | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIM
ESTAMP |
| status        | enum('0','1') | YES  |     | NULL              |
       |
+---------------+---------------+------+-----+-------------------+----------------------
-------+
7 rows in set (0.04 sec)

mysql> INSERT INTO `users` VALUES(null,'vikas','vikas@gmail.com','admin',NOW(),null,'1')
;
Query OK, 1 row affected (0.36 sec)

mysql> SELECT * FROM `users`;
+----+-------+-----------------+----------+---------------------+---------------------+-
-------+
| id | name  | email           | password | register_date       | modify_date         |
status |
+----+-------+-----------------+----------+---------------------+---------------------+-
-------+
|  1 | vikas | vikas@gmail.com | admin    | 2013-08-28 10:42:26 | 2013-08-28 10:42:26 |
1      |
+----+-------+-----------------+----------+---------------------+---------------------+-
-------+
1 row in set (0.00 sec)

mysql> INSERT INTO `users`(`name`,`email`,`register_date`,`status`)
    -> VALUES
    -> ('anil','anil@yahoo.com',NOW(),'0');
Query OK, 1 row affected (0.15 sec)

mysql> INSERT INTO `users` SET
    -> `name`='jyoti',
    -> `email`='jyoti@rediffmail.com',
    -> `register_date`=NOW(),
    -> `status`='1';
Query OK, 1 row affected (1.80 sec)

mysql> SELECT * FROM `users`;
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
| id | name  | email                | password | register_date       | modify_date
   | status |
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
|  1 | vikas | vikas@gmail.com      | admin    | 2013-08-28 10:42:26 | 2013-08-28 10:42:
26 | 1      |
|  2 | anil  | anil@yahoo.com       | NULL     | 2013-08-28 10:51:54 | 2013-08-28 10:51:
54 | 0      |
|  3 | jyoti | jyoti@rediffmail.com | NULL     | 2013-08-28 10:53:19 | 2013-08-28 10:53:
19 | 1      |
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
3 rows in set (0.00 sec)

mysql> UPDATE `users` SET `password`='12345';
Query OK, 3 rows affected (0.03 sec)
Rows matched: 3  Changed: 3  Warnings: 0

mysql> SELECT * FROM `users`;
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
| id | name  | email                | password | register_date       | modify_date
   | status |
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
|  1 | vikas | vikas@gmail.com      | 12345    | 2013-08-28 10:42:26 | 2013-08-28 10:56:
09 | 1      |
|  2 | anil  | anil@yahoo.com       | 12345    | 2013-08-28 10:51:54 | 2013-08-28 10:56:
09 | 0      |
|  3 | jyoti | jyoti@rediffmail.com | 12345    | 2013-08-28 10:53:19 | 2013-08-28 10:56:
09 | 1      |
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
3 rows in set (0.00 sec)

mysql> UPDATE `users` SET `password`='aabcdxyz'
    -> WHERE `id`=3;
Query OK, 1 row affected (1.56 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> SELECT * FROM `users`;
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
| id | name  | email                | password | register_date       | modify_date
   | status |
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
|  1 | vikas | vikas@gmail.com      | 12345    | 2013-08-28 10:42:26 | 2013-08-28 10:56:
09 | 1      |
|  2 | anil  | anil@yahoo.com       | 12345    | 2013-08-28 10:51:54 | 2013-08-28 10:56:
09 | 0      |
|  3 | jyoti | jyoti@rediffmail.com | aabcdxyz | 2013-08-28 10:53:19 | 2013-08-28 10:56:
58 | 1      |
+----+-------+----------------------+----------+---------------------+------------------
---+--------+
3 rows in set (0.00 sec)

mysql> DELETE FROM `users` WHERE `email`='jyoti@rediffmail.com';
Query OK, 1 row affected (0.07 sec)

mysql> SELECT * FROM `users`;
+----+-------+-----------------+----------+---------------------+---------------------+-
-------+
| id | name  | email           | password | register_date       | modify_date         |
status |
+----+-------+-----------------+----------+---------------------+---------------------+-
-------+
|  1 | vikas | vikas@gmail.com | 12345    | 2013-08-28 10:42:26 | 2013-08-28 10:56:09 |
1      |
|  2 | anil  | anil@yahoo.com  | 12345    | 2013-08-28 10:51:54 | 2013-08-28 10:56:09 |
0      |
+----+-------+-----------------+----------+---------------------+---------------------+-
-------+
2 rows in set (0.00 sec)

mysql> DELETE FROM `users` WHERE `id`='1';
Query OK, 1 row affected (0.07 sec)

mysql> SELECT * FROM `users`;
+----+------+----------------+----------+---------------------+---------------------+---
-----+
| id | name | email          | password | register_date       | modify_date         | st
atus |
+----+------+----------------+----------+---------------------+---------------------+---
-----+
|  2 | anil | anil@yahoo.com | 12345    | 2013-08-28 10:51:54 | 2013-08-28 10:56:09 | 0
     |
+----+------+----------------+----------+---------------------+---------------------+---
-----+
1 row in set (0.00 sec)

mysql> DELETE FROM `users`;
Query OK, 1 row affected (0.07 sec)

mysql> SELECT * FROM `users`;
Empty set (0.00 sec)

mysql>
